package com.zee.recyclerview;

public abstract class RefreshAndLoadMordAdapter implements RefreshAndLoadMordListener {
    private int defaultStart = 0;//默认从0开始
    private int curPage = 0;

    public RefreshAndLoadMordAdapter() {
    }

    public RefreshAndLoadMordAdapter(int startPage) {
        this.defaultStart = startPage;
        curPage = defaultStart;
    }

    @Override
    public void onRefresh() {
        curPage = defaultStart;
        onStartLoad(curPage);
    }

    @Override
    public void onLoadMore() {
        curPage++;
        onStartLoad(curPage);
    }

    public abstract void onStartLoad(int curPage);
}
